package org.example.frw.canal.binlog.entity;

import cn.hutool.core.date.DateUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class BaseBinlogEntity {
    private Long creatorId;
    private Long modifierId;
    private String createTime;
    private String updateTime;
    private Long version;

    public Long createTimeTimestamp() {
        return DateUtil.parse(createTime, "yyyy-MM-dd HH:mm:ss").getTime();
    }
    public Long updateTimeTimestamp() {
        return DateUtil.parse(updateTime, "yyyy-MM-dd HH:mm:ss").getTime();
    }
}
